package com.zhuanzhuan.hero.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuanzhuan.hero.user.entity.HeroUserLabelAuthRecord;
import com.zhuanzhuan.hero.user.pojo.bo.CreateAuthRecordBO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * dal Interface:HeroUserLabelAuthRecord
 * @author hanjunjun
 * @date 2024-7-3
 */
public interface HeroUserLabelAuthRecordService extends IService<HeroUserLabelAuthRecord> {

    /**
     * 查询认证记录
     *
     * @param fromUid
     * @param toUid
     * @param labelType
     * @param operateType
     * @return com.zhuanzhuan.hero.user.entity.HeroUserLabelAuthRecord
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    List<HeroUserLabelAuthRecord> queryAuthRecord(Long fromUid, Long toUid, Integer labelType, Integer operateType);

    void delById(Long id);

    /**
     * 保存 成功认证记录
     *
     * @param createAuthRecordBO
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void createAuthRecord(CreateAuthRecordBO createAuthRecordBO);

    /**
     * 保存 取消认证记录
     *
     * @param createAuthRecordBO
     * @return void
     * @author  hanjunjun
     * @date 2024/7/5
     **/
    void createCancelAuthRecord(CreateAuthRecordBO createAuthRecordBO);

    void delAuthRecord(Long fromUid, Long toUid, Integer labelType, Integer operateType);

    /**
     * 查询认证数  按天分组
     *
     * @param uids
     * @param labelType
     * @param operateType
     * @param createTimeStart
     * @return java.util.Map<java.lang.String,java.lang.Integer> k:uid v:{k:日期 v:认证数}
     * @author  hanjunjun
     * @date 2024/7/8
     **/
    Map<Long, Map<Date, Integer>> queryAuthDateNum(List<Long> uids, Integer labelType, Integer operateType, Date createTimeStart);

    /**
     * 查询uid的认证数
     *
     * @param uids
     * @param labelType
     * @param operateType
     * @param createTimeStart
     * @return java.util.Map<java.lang.Long,java.lang.Integer>
     * @author  hanjunjun
     * @date 2024/7/29
     **/
    Map<Long, Integer> queryUidAuthNum(List<Long> uids, Integer labelType, Integer operateType, Date createTimeStart);
}